home *** CD-ROM | disk | FTP | other *** search
- Path: grafix.xs4all.nl!john.hendrikx
- Date: Tue, 30 Jan 96 18:51:40 GMT+1
- Newsgroups: comp.sys.amiga.programmer
- Distribution: world
- Subject: Re: Demo/game to OS friendly part II
- MIME-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: 8bit
- From: john.hendrikx@grafix.xs4all.nl (John Hendrikx)
- Message-ID: <john.hendrikx.4ai4@grafix.xs4all.nl>
- Organization: Grafix Attack BBS Holland
-
- In a message of 29 Jan 96 Peter McGavin wrote to All:
-
- >> that accessing the screen-buffer directly is a necessity for fast games,
- >> like a DOOM clone, as they want to do stuff on a pixel basis which the
- >> OS doesn't provide standard functions for (unlike line-drawing for
- >> example).
-
- PM> Personally I would like to see what seems a completely opposite approach
- PM> (for RTG). That is, I think gfx should be implemented something like
- PM> DOS. Gfx primitives like Draw(), SetAPen(), Text(), etc, internally
- PM> should use message-passing and packets. The Amiga has a big advantage
- PM> over other platforms that messages don't have to be copied.
-
- This advantage is likely to go away in the near future with a new OS version or
- soon after that. AT would be wise not to rely too much on these 'side-effects'
- of a system which is not memory-protected.
-
- PM> Applications can choose either synchronous or asynchronous interfaces.
- PM> Gfx card drivers would have standard async BeginIO() functions. The
- PM> main advantages are:
-
- PM> o This allows much better high-level _async_ graphics than the
- PM> current implementation. Applications don't have to wait for
- PM> each primitive to finish before they queue the next one. Indeed,
- PM> an application could queue hundreds or thousands of operations
- PM> in advance, then carry on with something else while the gfx
- PM> system catches up. Another scenario is that the application
- PM> queues only a few, large operations, such as a single, large,
- PM> WritePixelArray8() which operates with async DMA and uses no
- PM> CPU time. Thus, gfx coprocessors and DMA can be better
- PM> utilised;
-
- The blitter is a good example of this in Amiga right now. It is async, when
- you draw a line with the blitter usign DrawLine() there is no guarantee that
- when the function returns that the line is already drawn. You have to wait for
- the blitter to make sure.
-
- PM> o Gfx redirection across networks would be relatively trivial
- PM> (much like X11).
-
- Well, this would be none too hard even in the current system if NOBODY used the
- hardware but used the provided functions. These could then be patched to pass
- on their info to another machine via a network.
-
- PM> o It makes less assumptions about the underlying hardware. Gfx
- PM> hardware doesn't even have to be memory-mapped.
-
- That's basicly RTG.
-
- PM> o It is more straightforward to share the same hardware between
- PM> multiple tasks this way.
-
- Yes, but it would also involve passing a message for each gfx-action, while the
- current system, although less straightforward can just queu gfx-actions in a
- list (some current blitter functions do this) which achieves much the same
- effect.
-
- PM> But how could we reconcile such an interface with a system that allows
- PM> direct hardware poking? (and which won't work with "non-standard" gfx
- PM> hardware or networks, BTW.)
-
- I think RTG will do what you want just fine, what you're suggesting would just
- make things even slower although it has some advantages.
-
- I like to point out though that I don't consider accessing buffer memory for
- gfx or sample-data 'hardware poking'. I think that apps should be allowed to
- use this memory (in a very controlled way) but when I say apps I really mean
- apps which require this kind of low-level buffer access (for speed) like a game
- for instance, or sample-mixing software for example.
-
- The only thing I really want to see completely banned is poking registers which
- in some way affects the gfx-card's (or sound card's and so on) behaviour.
- Accessing registers should be left strictly to the device-driver (ie, the OS).
- Writing new device drivers is possible of course but a normal app should only
- be able to go through the device driver.
-
- As poking registers is usually a very small part of CPU time used by games (and
- some apps) I think the overhead to let the OS poke the registers for you
- (although it should be completely abstract, not like some current graphics are
- now) is minimal. A good example of this is that games often use their own
- waitblitter routine, while calling WaitBlit() certainly won't have any impact
- on overall speed of the game at all.
-
- Grtz John
-
- -----------------------------------------------------------------------
- John.Hendrikx@grafix.xs4all.nl TextDemo/FastView/Etc... development
- -----------------------------------------------------------------------
- -- Via Xenolink 1.981, XenolinkUUCP 1.1
-